// free tools for java
Script examples
T o o l s
-Assembler
--Package examples
--Script examples
--Jas API
--Scripting API
--Notes
  This section assumes that you have a working knowledge of bytecode and the java VM. The java VM specification is the best bet of information for this, and was last sighted here.

The assembler is also usable through a scripting interface that has a passing similarity to scheme, and if you plan to use this scripting interface, it would help if you understood scheme. I've walked through a few examples to show how the scripting driver to the package can be used to generate bytecode.

  examples
 
Simple
The goal is to generate a class that simply gets initialized.
Loops
Generate bytecode with control transfers in it. This example generates a class that prints a string in a loop.
Mini expression compiler
A slightly more extensive example that uses the script to write a code generator for arithmetic expressions defined in itself.
 
T o o l s/Assembler

Package examples | Script examples | Jas API | Scripting API | Notes

http://www.sbktech.org/jas-scm.html Revised: Thu Dec 19 08:51:14 1996
Copyright (C) 1996 KB Sriram.
Comments, bug reports: kbs@sbktech.org
Found something useful?